package com.lantosec.hmrp.modules.form.vo;

import com.lantosec.hmrp.modules.form.entity.FormTempData;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * <p>
 * 流程表单数据临时保存表 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-05-27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="TempData对象", description="流程表单数据临时保存表")
public class FormTempDataVO extends BaseVO<FormTempData> {
    private static final long serialVersionUID = 1L;


    public FormTempDataVO(FormTempData entity){
        this.tempDataId = entity.getTempDataId();
        this.userId = entity.getUserId();
        this.procdefId = entity.getProcdefId();
        this.taskId = entity.getTaskId();
        this.layoutId = entity.getLayoutId();
        this.formData = entity.getFormData();
        this.auditStatus = entity.getAuditStatus();
        this.comment = entity.getComment();
        this.createTime = entity.getCreateTime();
    }

    @Override
    public FormTempData convertToEntity(){
        return new FormTempData(this);
    }


    @ApiModelProperty(value = "主键记录ID")
    private String tempDataId;

    @ApiModelProperty(value = "用户Id")
    private String userId;

    @ApiModelProperty(value = "Flowable流程定义ID")
    private String procdefId;

    @ApiModelProperty(value = "Flowable流程任务Id")
    private String taskId;

    @ApiModelProperty(value = "表单布局Id")
    private String layoutId;

    @ApiModelProperty(value = "表单数据")
    private String formData;

    @ApiModelProperty(value = "审核状态 0 不通过，1 通过")
    private Integer auditStatus;

    @ApiModelProperty(value = "审核意见")
    private String comment;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;


}
